{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Word language-model results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "size = [7135600, 28390700, 85917000, 25487550, 16847550, 8591700, 4295850]\n",
    "perplexity = [96.29, 84.21, 83.85, 82.93, 83.64, 85.67, 92.79]\n",
    "labels = ['small', 'medium', 'large', 'large-70', 'large-80', 'large-90', 'large-95']\n",
    "colors =  ['r', 'r', 'r', 'b', 'b', 'b', 'b']\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(10, 5))\n",
    "ax.scatter(size, perplexity, c=colors, s=100)\n",
    "\n",
    "baidu_size = [8591700, 14542053, 17928543,  25190010,  13430535   ]\n",
    "baidu_perplexity = [87.70, 85.34, 84.16, 84.05, 83.70]\n",
    "baidu_labels = ['large-90', 'large-83', 'large-79', 'large-71', 'large-81.3']\n",
    "ax.scatter(baidu_size, baidu_perplexity, c='g', s=100)\n",
    "\n",
    "\n",
    "plt.ylabel('perplexity')\n",
    "plt.xlabel('size')\n",
    "\n",
    "for i, txt in enumerate(labels):\n",
    "    ax.annotate(txt, (size[i],perplexity[i]+0.4))\n",
    "    \n",
    "for i, txt in enumerate(baidu_labels):\n",
    "    ax.annotate(txt, (baidu_size[i], baidu_perplexity[i]+0.4))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "size = [7135600, 28390700, 85917000, 25487550, 16847550, 8591700, 4295850]\n",
    "perplexity = [96.29, 84.21, 83.85, 82.93, 83.64, 85.67, 92.79]\n",
    "labels = ['small', 'medium', 'large', 'large-70', 'large-80', 'large-90', 'large-95']\n",
    "colors =  ['r', 'r', 'r', 'b', 'b', 'b', 'b']\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(10, 5))\n",
    "ax.scatter(size, perplexity, c=colors, s=100)\n",
    "\n",
    "\n",
    "plt.ylabel('perplexity')\n",
    "plt.xlabel('size')\n",
    "\n",
    "for i, txt in enumerate(labels):\n",
    "    ax.annotate(txt, (size[i],perplexity[i]+0.4))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
